/*  1:   */ package org.jetbrains.jps.model.serialization.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.JpsElementFactory;
import org.jetbrains.jps.model.JpsGlobal;
import org.jetbrains.jps.model.JpsModel;
import org.jetbrains.jps.model.serialization.*;

import java.io.IOException;
import java.util.Map;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */
/* 14:   */
/* 15:   */ 
/* 16:   */ public class JpsSerializationManagerImpl
/* 17:   */   extends JpsSerializationManager
/* 18:   */ {
/* 19:   */   @NotNull
/* 20:   */   public JpsModel loadModel(@NotNull String paramString1, @Nullable String paramString2)
/* 21:   */     throws IOException
/* 22:   */   {
/* 23:36 */     if (paramString1 == null) {
/* 24:36 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/serialization/impl/JpsSerializationManagerImpl", "loadModel" }));
/* 25:   */     }
/* 26:36 */     JpsModel localJpsModel = JpsElementFactory.getInstance().createModel();
/* 27:37 */     if (paramString2 != null) {
/* 28:38 */       JpsGlobalLoader.loadGlobalSettings(localJpsModel.getGlobal(), paramString2);
/* 29:   */     }
/* 30:40 */     Map localMap = JpsModelSerializationDataService.computeAllPathVariables(localJpsModel.getGlobal());
/* 31:41 */     JpsProjectLoader.loadProject(localJpsModel.getProject(), localMap, paramString1); JpsModel 
/* 32:42 */       tmp85_84 = localJpsModel;
/* 33:42 */     if (tmp85_84 == null) {
/* 34:42 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/serialization/impl/JpsSerializationManagerImpl", "loadModel" }));
/* 35:   */     }
/* 36:42 */     return tmp85_84;
/* 37:   */   }
/* 38:   */   
/* 39:   */   public void saveGlobalSettings(@NotNull JpsGlobal paramJpsGlobal, @NotNull String paramString)
/* 40:   */     throws IOException
/* 41:   */   {
/* 42:47 */     if (paramJpsGlobal == null) {
/* 43:47 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/serialization/impl/JpsSerializationManagerImpl", "saveGlobalSettings" }));
/* 44:   */     }
/* 45:47 */     if (paramString == null) {
/* 46:47 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/jps/model/serialization/impl/JpsSerializationManagerImpl", "saveGlobalSettings" }));
/* 47:   */     }
/* 48:47 */     JpsGlobalElementSaver.saveGlobalElement(paramJpsGlobal, paramString);
/* 49:   */   }
/* 50:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl

 * JD-Core Version:    0.7.0.1

 */